#ifndef _VIDEO
#define _VIDEO
 
#include <QApplication>
#include <QWidget>
#include <QLabel>
#include <QHBoxLayout>
#include <QRubberBand>
#include <QPoint>
#include <QMouseEvent>

#include <iostream>
 
class Video : public QWidget
{
	Q_OBJECT

    public:
    Video();
	
	void mousePressEvent(QMouseEvent *event);
	void mouseMoveEvent(QMouseEvent *event);
	void mouseReleaseEvent(QMouseEvent *event); 
	
	public slots:
	void setImg(unsigned char * buff, int width, int height);


    private:
	QLabel *img;
	QRubberBand *rubberBand;
	QPoint origin;
	QPoint end;
};
 
#endif
